/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Arrays;
import java.util.Date;

/**
 * <p>Project: javase - Arry5
 * <p>Powered by webrx On 2021-11-26 15:33:30
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Arry5 {
    public static void main(String[] args) {
        int[] a = new int[3];
        //声明一个数组，什么元素都可以

        //java.lang.Object 是基类，是所有默认的父类
        Object[] obs = new Object[10];
        obs[0] = 1;
        obs[1] = .5;
        obs[2] = new Date();

        //三维数组
        int[][][] nss = new int[][][]{
                {
                        {1, 2, 3}, {4, 5, 6}
                },
                {
                        {10, 20, 30}
                },
                {
                        {11, 22, 33}, {44, 55, 66, 77, 88, 99, 10}
                }
        };

        System.out.println(Arrays.deepToString(nss));

        //System.out.println(nss[2][0][1]);
        //System.out.println(nss[2][1][0]);
        //System.out.println(nss[0][1][2]);


        for (int[][] ints : nss) {
            for (int[] anInt : ints) {
                for (int i : anInt) {
                    //System.out.println(i);
                }
                //System.out.println("======");
            }
            //System.out.println("----------");
        }
    }
}
